// 全选
var content = document.querySelector(".bd_right_all_item_xx");
var arr = [{
     "strong":"1",
    "bd_pc_temp_songname": "DJ小鱼儿 - 夜夜夜漫长",
    "sTime": "3:01"
}, {  "strong":"2",
    "bd_pc_temp_songname": "闻音来过 - 错位时空",
    "sTime": "3:16"
}, {  "strong":"3",
    "bd_pc_temp_songname": "王佳杨 - 遗憾",
    "sTime": "4:15"
}, {  "strong":"4",
    "bd_pc_temp_songname": "Tăng Duy Tân、Phong Max - Ngây Thơ",
    "sTime": "4:13"
}, {  "strong":"5",
    "bd_pc_temp_songname": "金志文 - 太傻 (Live)",
    "sTime": "5:05"
}, {  "strong":"6",
    "bd_pc_temp_songname": "李克勤 - 一生不变",
    "sTime": "4:22"
}, {  "strong":"7",
    "bd_pc_temp_songname": "Klaas - Calavera (Original Edit)",
    "sTime": "3:20"
}, { "strong":"8",
    "bd_pc_temp_songname": "Aquarius - Ngay Tho (aquarius Remix)",
    "sTime": "4:39"
}, { "strong":"9",
    "bd_pc_temp_songname": "刘老板 - 兄弟再干一杯",
    "sTime": "4:06"
}, { "strong":"10",
    "bd_pc_temp_songname": "黄静美、乔洋 - 一半清醒一半醉",
    "sTime": "3:55"
}, { "strong":"11",
    "bd_pc_temp_songname": "双笙 - 漫长的告白",
    "sTime": "4:48"
}, { "strong":"12",
    "bd_pc_temp_songname": "海来阿木 - 浪子心 (DJ沈念版)",
    "sTime": "5:28"
}, { "strong":"13",
    "bd_pc_temp_songname": "名决 - 樱花树下的重逢",
    "sTime": "2:10"
}, { "strong":"14",
    "bd_pc_temp_songname": "黄霄雲 - 星辰大海",
    "sTime": "3:27"
}, { "strong":"15",
    "bd_pc_temp_songname": "黎林添娇 - 天生丽质没办法 (DJ版)",
    "sTime": "2:45"
}, { "strong":"16",
    "bd_pc_temp_songname": "泽国同学 - 折风渡夜 (DJ名龙版)",
    "sTime": "3:50"
}, { "strong":"17",
    "bd_pc_temp_songname": "司徒兰芳 - 就当我们从未爱过",
    "sTime": "3:23"
}, { "strong":"18",
    "bd_pc_temp_songname": "大壮 - 坦白",
    "sTime": "4:52"
}, { "strong":"19",
    "bd_pc_temp_songname": "无孟子 - 爱人错过",
    "sTime": "3:48"
}, { "strong":"20",
    "bd_pc_temp_songname": "杨小壮 - 两个世界",
    "sTime": "4:11"
}, { "strong":"21",
    "bd_pc_temp_songname": "颜一彦 - 红尘悠悠",
    "sTime": "3:42"
} ,{ "strong":"22",
"bd_pc_temp_songname": "YangYang - 关机又关机",
"sTime": "3:01"
}]
function render(arr) {
    var str = ''
    arr.forEach(single => {
        str +=
            `
            <li class="bd_right_all_item_title">
            <span class="bd_right_all_xx empty"></span>
            <span class="bd_pc_temp_num"><strong>${single.strong}</strong></span>
            <span class="bd_pc_temp_tips_1"><i class="bd_pc_temp_icon_new"></i></span>
            <a href="#" class="bd_pc_temp_songname">${single.bd_pc_temp_songname}</a>
            <span class="oper">
            <span class="bd-yincang">
            <a href="#" class="yicang-anuiu1"></a>
            <a href="#" class="yicang-anuiu2"></a>
            <a href="#" class="yicang-anuiu3"></a>
            </span>
            <a class="sTime">${single.sTime}</a>
        </span>

        </li>
        `
    });
    content.innerHTML = str;
}

render(arr)
var all =document.querySelector('.bd_right_all')
var btn =document.querySelectorAll('.bd_right_all_xx')


$(function(){
$(all).on('click', function() {
if ($(all).hasClass('empty')) {
    $(all).removeClass('empty');
    $(btn).removeClass('empty');
    } else {
    $(all).addClass('empty');
    $(btn).addClass('empty');
    }
})
$(btn).on('click', function() {
   $(this).toggleClass("empty");
   $(all).removeClass("empty");
})
})